package com.lobstar.xrpc.example;

import com.lobstar.xrpc.client.main.MainClient;
import com.lobstar.xrpc.example.interfaces.IService;
import com.lobstar.xrpc.processor.ServiceProcessor;

public class ServiceProxy {

	public static void main(String[] args) throws Exception {
		MainClient client = MainClient.build("proxy", "127.0.0.1", 20002,null).blockStart();
		IService iService = ServiceProcessor.buildServiceByClient(client, IService.class);
		System.out.println(iService.sum(4,7));
		client.close();
	}
}
